import { ref, onMounted, onBeforeUnmount, toRefs} from 'vue'
export default function () {
    //展示的数据  可以通过App.vue 界面去隐藏
    const showPosition = ref(false)
    const updatePosition = (params: boolean) => {
      showPosition.value = params
      setTimeout(() => {
        showPosition.value = params;
      }, 100);
    }
    //现实之后调用 挂载完毕
    onMounted(() => {
        setTimeout(() => {
            showPosition.value = true;
          }, 100);
    })

    //在隐藏之前调用 卸载之前
    onBeforeUnmount(() => {
    })

    return {
        updatePosition,
        showPosition,
    }
}
